const init = {
    count: 0
}
export default function countReducer(prevState = init, action) {
console.log('redux调用啦');
console.log(prevState);
    const { type, data } = action;
    switch (type) {
        case "inCreatmentCount":
            return {
                ...init, count: prevState.count + data
            };
        case "deCreatmentCount":
            return {
                ...init, count: prevState.count - data
            };
    }
    
    return prevState
}